/*
 * Copyright 2006-2008 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.martinimix.service.syndication;

import net.martinimix.domain.syndication.SyndicationFeed;

/**
 * Provides a syndicated data feed publishing service.
 * 
 * @author Scott Rossillo
 *
 */
public interface SyndicationFeedPublishingService {
	
	/**
	 * Returns the base URL for feeds published by this syndication feed publishing service.
	 * 
	 * All feeds are only required to provide a universal name locator (URN).  It is
	 * the responsibility of the publishing service to provide the base URL for
	 * its feeds.
	 * 
	 * @return the base <code>URL</code> for all feeds published by this service  
	 */
	public String getFeedBaseUrl();

	/**
	 * Publishes the given feed.
	 * 
	 * @param feed the <code>SyndicationFeed</code> to publish
	 * 
	 * @throws SyndicationFeedPublishFailedException if an error occurs while publishing
	 * the given <code>feed</code>
	 */
	public void publish(SyndicationFeed feed) throws SyndicationFeedPublishFailedException;
	
}
